$().ready(function(){

    var nav = getSearch('nav');
    var navList = {};
    for(let i in mainList){
        if(nav == mainList[i].id){
            navList = mainList[i];
        }
    }
    var item = getSearch('item');
    // console.log(item);
    var navItem = '';
    for(let j in navList.list){
        if(item == navList.list[j].id){
            navItem = navList.list[j];
        }
    }

    var breadcream = '<a href="index.html">首页</a>';
        breadcream += '<a href="'+navList.link+'?nav='+navList.id+'">'+navList.name+'</a>';
        breadcream += '<a href="">'+navItem.name+'</a>';
    $('#breadcream').html(breadcream);
    var apiUrl;
    if(item == 1){
        apiUrl = '/Api/New/get_jtjs';
    }else if(item == 2){
        apiUrl = '/Api/New/get_dszzc';
    }else if(item == 4){
        apiUrl = '/Api/New/get_qywh';
    }else if(item == 7){
        apiUrl = '//Api/New/get_cyjd';
    }

    getAjax(apiUrl,res=>{
        console.log(res);
        var html = res[0].content;
        // if(nav == 5){
        //     html = res.content;
        // }else{
        //     html = res[0].content;
        // }
        $('#content-box').html(html)
    })
})
